package com.ruoyi.ring.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.ring.domain.RingInteractiveComments;
import com.ruoyi.ring.mapper.RingInteractiveCommentsMapper;
import com.ruoyi.ring.service.IRingInteractiveCommentsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 互动评论Service业务层处理
 * 
 * @author liuwp
 * @date 2025-11-21
 */
@Service
public class RingInteractiveCommentsServiceImpl implements IRingInteractiveCommentsService 
{
    @Resource
    private RingInteractiveCommentsMapper ringInteractiveCommentsMapper;

    /**
     * 查询互动评论
     * 
     * @param id 互动评论主键
     * @return 互动评论
     */
    @Override
    public RingInteractiveComments selectRingInteractiveCommentsById(Long id)
    {
        return ringInteractiveCommentsMapper.selectRingInteractiveCommentsById(id);
    }

    /**
     * 查询互动评论列表
     * 
     * @param ringInteractiveComments 互动评论
     * @return 互动评论
     */
    @Override
    public List<RingInteractiveComments> selectRingInteractiveCommentsList(RingInteractiveComments ringInteractiveComments)
    {
        return ringInteractiveCommentsMapper.selectRingInteractiveCommentsList(ringInteractiveComments);
    }

    /**
     * 根据业务主键查询一条记录：互动评论
     *
     * @param ringInteractiveComments 互动评论
     * @return 互动评论
     */
    @Override
    public RingInteractiveComments selectOneRingInteractiveComments(RingInteractiveComments ringInteractiveComments)
    {
        return ringInteractiveCommentsMapper.selectOneRingInteractiveComments(ringInteractiveComments);
    }

    /**
     * 新增互动评论
     * 
     * @param ringInteractiveComments 互动评论
     * @return 结果
     */
    @Override
    public int insertRingInteractiveComments(RingInteractiveComments ringInteractiveComments)
    {
        ringInteractiveComments.setCreateTime(DateUtils.getNowDate());
        return ringInteractiveCommentsMapper.insertRingInteractiveComments(ringInteractiveComments);
    }

    /**
     * 修改互动评论
     * 
     * @param ringInteractiveComments 互动评论
     * @return 结果
     */
    @Override
    public int updateRingInteractiveComments(RingInteractiveComments ringInteractiveComments)
    {
        return ringInteractiveCommentsMapper.updateRingInteractiveComments(ringInteractiveComments);
    }

    @Override
    public int updateRingInteractiveCommentsCondition(RingInteractiveComments ringInteractiveComments, RingInteractiveComments ringInteractiveCommentsCondition)
    {
        return ringInteractiveCommentsMapper.updateRingInteractiveCommentsCondition(ringInteractiveComments, ringInteractiveCommentsCondition);
    }

    /**
     * 批量删除互动评论
     * 
     * @param ids 需要删除的互动评论主键
     * @return 结果
     */
    @Override
    public int deleteRingInteractiveCommentsByIds(Long[] ids)
    {
        return ringInteractiveCommentsMapper.deleteRingInteractiveCommentsByIds(ids);
    }

    /**
     * 删除互动评论信息
     * 
     * @param id 互动评论主键
     * @return 结果
     */
    @Override
    public int deleteRingInteractiveCommentsById(Long id)
    {
        return ringInteractiveCommentsMapper.deleteRingInteractiveCommentsById(id);
    }

    /**
     * 条件删除互动评论
     *
     * @param ringInteractiveComments 互动评论
     * @return 结果
     */
    @Override
    public int deleteRingInteractiveCommentsByCondition(RingInteractiveComments ringInteractiveComments)
    {
        return ringInteractiveCommentsMapper.deleteRingInteractiveCommentsByCondition(ringInteractiveComments);
    }

}
